package com.example.nbastar.Database;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class AccountDatabase extends SQLiteOpenHelper {
    private static final String SQLWords = "create table account(" +
            "_id integer primary key autoincrement," +
            "zhanghao varchar(20)," +
            "mima varchar(20)" +
            ");";

    public AccountDatabase(Context context) {
        super(context, "account.db", null , 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(SQLWords);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        db.execSQL("drop table account");
        db.execSQL(SQLWords);
    }
}
